# 项目基础配置
ALLOWED_HOSTS = ['*']
DEBUG = False

# 缓存
CACHES = {
    "default": {
        "BACKEND": "django_redis.cache.RedisCache",
        "LOCATION": "redis://192.168.20.234:6379",
        "OPTIONS": {
            "CLIENT_CLASS": "django_redis.client.DefaultClient",
            "CONNECTION_POOL_KWARGS": {"max_connections": 100},
            # "PASSWORD": "密码",
            "DECODE_RESPONSES": True
        }
    },
}

CHANNEL_LAYERS = {
    "default": {
        "BACKEND": "channels_redis.core.RedisChannelLayer",
        "CONFIG": {
            "hosts": [("192.168.20.234", 6379)],
            "capacity": 1000,
            "expiry": 120,
        },
    },
}

# 数据库
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'HOST': '192.168.20.234',
        'POST': 8992,
        'NAME': "django_devops",
        "USER": "devops",
        "PASSWORD": "devops123",
    }
}
